#include<stdio.h>
int max(int a, int b)
{
	if (a > b)
		return a;
	else
		return b;
}
int main()
{
	int n, i,a,j;
	int arr[100] = { 0 };
	int dp[100] = { 0 };
	scanf_s("%d", &n);
	for (a = 1; a <= n; a++)
		scanf_s("%d", &arr[a]);

	for (i = 1; i <= n; i++)
	{
		dp[i] = 1;
		for (j = 1; j <i; j++)
		{
			if(arr[j]<arr[i])
			dp[i] = max( dp[i],dp[j] + 1 );
		}
		printf("dp[%d]=%d\n", i, dp[i]);
	}
	return 0;
}